const baseUrl = 'http://localhost:3000'
const request = (type = 'GET', url, date = {},header ) => {
	return new Promise((resolve, reject) => {
		uni.request({
			method: type,
			url: baseUrl + url,
			data: date,
			header,
			success: function(res) {

				resolve(res)
			},
			fail: function(err) {
				reject(err)
			},
			withCredentials:true
		})
	});
}
export default request
